home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / CIncludes / VideoServices.h < prev    next >
C/C++ Source or Header  |  1996-05-01  |  4KB  |  139 lines

  1. /*
  2.      File:        VideoServices.h
  3.  
  4.      Contains:    Video Services Library Interfaces.
  5.  
  6.      Version:    Technology:    PowerSurge 1.0.2
  7.                  Release:    Universal Interfaces 3.0d3 on Copland DR1
  8.  
  9.      Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10.  
  11.      Bugs?:        If you find a problem with this file, send the file and version
  12.                  information (from above) and the problem description to:
  13.  
  14.                      Internet:    apple.bugs@applelink.apple.com
  15.                      AppleLink:    APPLE.BUGS
  16.  
  17. */
  18. #ifndef __VIDEOSERVICES__
  19. #define __VIDEOSERVICES__
  20.  
  21. #ifndef __TYPES__
  22. #include <Types.h>
  23. #endif
  24. #ifndef __NAMEREGISTRY__
  25. #include <NameRegistry.h>
  26. #endif
  27. #ifndef __QUICKDRAW__
  28. #include <Quickdraw.h>
  29. #endif
  30.  
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif
  34.  
  35. #if PRAGMA_IMPORT_SUPPORTED
  36. #pragma import on
  37. #endif
  38.  
  39. #if PRAGMA_ALIGN_SUPPORTED
  40. #pragma options align=mac68k
  41. #endif
  42.  
  43.  
  44. enum {
  45.     kTransparentEncoding        = 0,
  46.     kInvertingEncoding            = 1
  47. };
  48.  
  49.  
  50. enum {
  51.     kTransparentEncodingShift    = (kTransparentEncoding << 1),
  52.     kTransparentEncodedPixel    = (0x01 << kTransparentEncodingShift),
  53.     kInvertingEncodingShift        = (kInvertingEncoding << 1),
  54.     kInvertingEncodedPixel        = (0x01 << kInvertingEncodingShift)
  55. };
  56.  
  57.  
  58. enum {
  59.     kHardwareCursorDescriptorMajorVersion = 0x0001,
  60.     kHardwareCursorDescriptorMinorVersion = 0x0000
  61. };
  62.  
  63. typedef UInt32 *UInt32Ptr;
  64. struct HardwareCursorDescriptorRec {
  65.     UInt16                             majorVersion;
  66.     UInt16                             minorVersion;
  67.     UInt32                             height;
  68.     UInt32                             width;
  69.     UInt32                             bitDepth;
  70.     UInt32                             maskBitDepth;
  71.     UInt32                             numColors;
  72.     UInt32Ptr                         colorEncodings;
  73.     UInt32                             flags;
  74.     UInt32                             supportedSpecialEncodings;
  75.     UInt32                             specialEncodings[16];
  76. };
  77. typedef struct HardwareCursorDescriptorRec HardwareCursorDescriptorRec;
  78.  
  79. typedef HardwareCursorDescriptorRec *HardwareCursorDescriptorPtr;
  80.  
  81. enum {
  82.     kHardwareCursorInfoMajorVersion = 0x0001,
  83.     kHardwareCursorInfoMinorVersion = 0x0000
  84. };
  85.  
  86. struct HardwareCursorInfoRec {
  87.     UInt16                             majorVersion;                /* Test tool should check for kHardwareCursorInfoMajorVersion1*/
  88.     UInt16                             minorVersion;                /* Test tool should check for kHardwareCursorInfoMinorVersion1*/
  89.     UInt32                             cursorHeight;
  90.     UInt32                             cursorWidth;
  91.     CTabPtr                         colorMap;                    /* nil or big enough for hardware's max colors*/
  92.     Ptr                             hardwareCursor;
  93.     UInt32                             reserved[6];                /* Test tool should check for 0s*/
  94. };
  95. typedef struct HardwareCursorInfoRec HardwareCursorInfoRec;
  96.  
  97. typedef HardwareCursorInfoRec *HardwareCursorInfoPtr;
  98.  
  99. enum {
  100.     kVBLInterruptServiceType    = 'vbl ',
  101.     kHBLInterruptServiceType    = 'hbl ',
  102.     kFrameInterruptServiceType    = 'fram'
  103. };
  104.  
  105. typedef ResType InterruptServiceType;
  106. typedef UInt32 InterruptServiceIDType;
  107. typedef InterruptServiceIDType *InterruptServiceIDPtr;
  108. #if FOR_SYSTEM7_ONLY
  109. extern OSErr VSLNewInterruptService(RegEntryID *serviceDevice, InterruptServiceType serviceType, InterruptServiceIDPtr serviceID);
  110.  
  111. #endif
  112. #if FOR_SYSTEM8_PREEMPTIVE
  113. extern OSErr VSLNewInterruptService(RegEntryRef *serviceDevice, InterruptServiceType serviceType, InterruptServiceIDPtr serviceID);
  114.  
  115. extern OSErr VSLWaitOnInterruptService(InterruptServiceIDType serviceID, Duration timeout);
  116.  
  117. #endif
  118. extern OSErr VSLDisposeInterruptService(InterruptServiceIDType serviceID);
  119.  
  120. extern OSErr VSLDoInterruptService(InterruptServiceIDType serviceID);
  121.  
  122. extern Boolean VSLPrepareCursorForHardwareCursor(void *cursorRef, HardwareCursorDescriptorPtr hardwareDescriptor, HardwareCursorInfoPtr hwCursorInfo);
  123.  
  124.  
  125. #if PRAGMA_ALIGN_SUPPORTED
  126. #pragma options align=reset
  127. #endif
  128.  
  129. #if PRAGMA_IMPORT_SUPPORTED
  130. #pragma import off
  131. #endif
  132.  
  133. #ifdef __cplusplus
  134. }
  135. #endif
  136.  
  137. #endif /* __VIDEOSERVICES__ */
  138.  
  139.